//
//  LoginTopVM.swift
//  kxf
//
//  Created by Mac on 2024/3/4.
//

import Foundation

class LoginTopVM: UIView {
    
    let selfHeight = kFitWidth(261)

    override init(frame:CGRect){
        super.init(frame: CGRect.init(x: 0, y: 0, width: SCREEN_WIDHT, height: selfHeight))
        self.backgroundColor = .white
        self.isUserInteractionEnabled = true
        
        initUI()
    }
    required init?(coder: NSCoder) {
        fatalError("init(coder:) has not been implemented")
    }
    lazy var bgImgView : UIImageView = {
        let img = UIImageView()
        img.image = UIImage.init(named: "login_top_bg")
        
        return img
    }()
    lazy var logoImgView : UIImageView = {
        let img = UIImageView()
        img.image = UIImage.init(named: "login_logo_img")
        
        return img
    }()
}

extension LoginTopVM{
    func initUI(){
        addSubview(bgImgView)
        addSubview(logoImgView)
        
        bgImgView.snp.makeConstraints { make in
            make.left.top.width.equalToSuperview()
            make.bottom.equalTo(kFitWidth(-44))
        }
        logoImgView.snp.makeConstraints { make in
            make.width.height.equalTo(kFitWidth(88))
            make.bottom.equalToSuperview()
            make.centerX.lessThanOrEqualToSuperview()
        }
    }
}
